package com.itheima.model.common.dtos;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class PageRequestDto {
    @ApiModelProperty(value = "当前页",required = true)
        protected Integer size;//显示几页
    @ApiModelProperty(value = "每页显示条数",required = true)
        protected Integer page;//每页显示条数
    public void checkParam(){
        if (this.page==null||this.page<0){
            setPage(1);
        }
        if (this.size==null||this.size<0||this.size>100){
            setSize(10);
        }
    }


}
